<template>
	<view>
		<!-- <view class="top">
			<image src="@/static/img/san.png" class="san"  @tap="goBack()"></image>
			<view class="title">
				推广者中心
			</view>

		</view> -->
		<uni-nav-bar dark :fixed="true" shadow background-color="red" status-bar left-icon="left" left-text="返回"
			title="推广者中心" @clickLeft="goBack"></uni-nav-bar>
		<view class="main">
			<view class="form-section">
				<view class="form-item">
					<view class="label">推广者名称</view>
					<view class="input-box">
						<input placeholder="请输入推广者名称" v-model="form.PromotionName" :disabled="IsPromotion" />
					</view>
				</view>

				<view class="form-item">
					<view class="label">推 广 地 址</view>
					<view class="address-box">
						<view class="picker-box">
							<picker mode="selector" :range="addressArr" range-key="description"
								@change="bindaddressChange" v-model="form.PromotionAddress">
								<view class="picker">
									{{ addressArr[Addressindex].description }}
								</view>
							</picker>
						</view>
						<view class="address-btn" @click="nato('/pages/address/address')">
							<text class="btn-icon">📍</text>
							<text class="btn-text">管理</text>
						</view>
					</view>
				</view>

				<view class="form-item">
					<view class="label">推 广 类 别</view>
					<view class="picker-box">
						<picker mode="selector" :range="array" range-key="promotionsUserTypeNm"
							@change="bindPickerChange" v-model="form.PromotionUserType" :disabled="IsPromotion">
							<view class="picker">
								{{ array[index].promotionsUserTypeNm }}
							</view>
						</picker>
					</view>
				</view>

				<view class="form-item">
					<view class="label">场 所 信 息</view>
					<view class="upload-box">
						<view class="img-box">
							<!-- 	<image v-if="form.SiteInfoImgs" :src="form.SiteInfoImgs" class="preview-image"
							></image> -->
							<image v-if="form.SiteInfoImgs" :src="form.SiteInfoImgs" class="preview-image"></image>
							<view v-else class="upload-placeholder" @click="uploadpic('SiteInfoImgs')">
								<text class="upload-icon">+</text>
								<text class="upload-text">上传场所图片</text>
							</view>
						</view>
						<view class="upload-desc">商家门头场所或个人照片</view>
					</view>
				</view>

				<view class="form-item">
					<view class="label">实 名 信 息</view>
					<view class="id-box">
						<view class="img-box">
							<!-- <image v-if="form.RealNameImgs" :src="form.RealNameImgs" class="preview-image"
								@click='uploadpic("RealNameImgs")'></image> -->
							<image v-if="form.RealNameImgs" :src="form.RealNameImgs" class="preview-image"></image>
							<view v-else-if="IsPromotion" class="upload-placeholder">
								<!-- <text class="upload-icon">+</text> -->
								<text class="upload-text">营业执照或身份证</text>
							</view>
							<view v-else class="upload-placeholder" @click='uploadpic("RealNameImgs")'>
								<!-- <text class="upload-icon">+</text> -->
								<text class="upload-text">营业执照或身份证</text>
							</view>
						</view>
						<input v-model="form.RealNameInfo" placeholder="证件号码" class="id-input"
							:disabled="IsPromotion" />
					</view>
				</view>

				<view class="form-item">
					<view class="label">联 系 电 话</view>
					<view class="input-box">
						<input v-model="form.ContactNumber" placeholder="联系电话" type="number" :disabled="IsPromotion" />
					</view>
				</view>

				<view class="form-item">
					<view class="label">推 广 图 文</view>
					<view class="media-box">
						<view class="media-desc">本图文用于用户抽奖时播放</view>
						<!-- <view class="media-content" @click='uploadmp4'> -->
						<view class="media-content" @click='uploadvideo("PromotionImgs")'>
							<image v-if="uptype == 1" :src="form.PromotionImgs" class="media-preview"></image>
							<video v-else-if="uptype == 0" id="myVideo" :src="form.PromotionImgs" controls
								class="media-preview" autoplay></video>
							<view v-else class="upload-placeholder">
								<text class="upload-icon">+</text>
								<text class="upload-text">上传推广图文</text>
							</view>
						</view>
						<view class="media-tip">图片/视频10S</view>
					</view>
				</view>
			</view>

			<view class="action-buttons">
				<view class="submit-btn" @tap="ok">申请（保存）</view>
				<view class="verify-btn" @tap="nato('/pages/InfoSet/WriteOff')">卡券核销</view>
			</view>
		</view>
		<tuiFoot></tuiFoot>
		<view class="bg" v-if="i == 2"></view>
		<view class="caozuo" v-if="i == 2">
			<view class="an">
				<view>现金劵</view>
				<view>98</view>
			</view>
			<view class="an">
				<view>折扣劵</view>
				<view>65</view>
			</view>
			<view class="an">
				<view>商品劵</view>
				<view>32</view>
			</view>
		</view>

		<view class="caozuo xiao" v-if="i == 2">
			<input class="hexiaom" />
			<view class="ok">核销</view>
		</view>
	</view>
</template>

<script>
	import tuiFoot from '@/components/red/foot.vue'
	import {
		PromotionUserApply,
		PromotionUsersEntity,
		GetPromotionUserAddressList
	} from "@/api/promotion";

	import {
		index
	} from "@/api/classification";
	import {
		add,
		examine_find
	} from "@/api/examine";
	import {
		SHType
	} from "@/api/classification";
	import {
		mapState,
		mapMutations
	} from 'vuex'

	export default {

		components: {
			tuiFoot
		},
		data() {
			return {
				array: [
					// '美容美发', '母婴', '酒店', '服装鞋包', '餐饮', '电器', '生活服务'
				],
				addressArr: [],
				classList: [

				],
				index: 0,
				Addressindex: 0,
				form: {
					PromotionAddress: '',
					PromotionName: '',
					PromotionUserType: '',
					SiteInfoImgs: '',
					RealNameImgs: '',
					RealNameInfo: '',
					ContactNumber: '',
					PromotionImgs: '',
					openId: '',

					// longitude: 0,
					// latitude: 0,
					// place: '',
					// real_name: '',
					// certificate: '',
					// tuwen: '',
					// name: ''
				},
				IsPromotion: false,
				uptype: -1,
				privacyAgree: false,
				domain: this.$config.HTTP_REQUEST_URL
			}
		},
		async onLoad() {
			// await this.selectIndex()
			//this.find()
			await this.getType();
			await this.setPromotion();
		},
		methods: {
			...mapMutations('user', ['SET_PROMOTIONID']),
			setPromotion() {
				var promotionId = this.$store.state.user.PromotionId;
				if (promotionId != null) {
					this.IsPromotion = true;
					this.loadEntity();
					return;
				}
				var query = {
					"openId": this.$store.state.user.openid
				};
				PromotionUsersEntity(query)
					.then(res => {
						if (res.status == 0) {
							if (res.data != null) {
								this.SET_PROMOTIONID(res.data.id);
							}
						}
					})
					.catch(res => {});
			},
			loadEntity() {
				var query = {
					"openId": this.$store.state.user.openid
				};
				PromotionUsersEntity(query)
					.then(res => {
						if (res.status == 0) {
							if (res.data != null) {
								let item = res.data;
								this.form = {
									PromotionAddress: item.promotionAddress,
									PromotionName: item.promotionName,
									PromotionUserType: item.promotionUserType,
									// SiteInfoImgs: `${this.domain}${item.siteInfoImgs}`,
									// RealNameImgs: `${this.domain}${item.realNameImgs}`,
									RealNameInfo: item.realNameInfo,
									ContactNumber: item.contactNumber,
									// PromotionImgs: `${this.domain}${item.promotionImgs}`,
									openId: item.openId
								};
								this.form.SiteInfoImgs = item.siteInfoImgs ? `${this.domain}${item.siteInfoImgs}` : '';
								this.form.RealNameImgs = item.realNameImgs ? `${this.domain}${item.realNameImgs}` : '';
								this.form.PromotionImgs = item.promotionImgs ? `${this.domain}${item.promotionImgs}` :
									'';
								if (this.GetExtension(this.form.PromotionImgs)) {
									this.uptype = 1
								} else {
									this.uptype = 0
								}
							}
						}
					})
					.catch(res => {});
			},
			GetExtension(filePath) {
				let match = /\.([0-9a-z]+)(?=\?|$)/i.exec(filePath.split('/').pop());
				let extension = match ? match[1] : '';
				const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg'];
				// 检查文件扩展名是否在图片扩展名数组中
				return imageExtensions.includes(extension);
			},
			getType() {
				SHType({})
					.then(res => {
						this.array = res.data
					})
					.catch(res => {

					});
				GetPromotionUserAddressList({
						"OpenId": this.$store.state.user.openid
					})
					.then(res => {
						var addressArr = res.data;
						if (addressArr.length > 0) {
							this.addressArr = res.data;
						} else {
							this.addressArr.push({
								"description": '无',
								id: ''
							});
						}
						this.form.PromotionAddress = this.addressArr[this.Addressindex].id + "";
					})
					.catch(res => {

					});
			},
			goBack() {
				uni.navigateBack({
					delta: 1 // 返回上一页面
				});
			},
			nato(url) {
				uni.navigateTo({
					url
				})
			},
			selectIndex() {
				return new Promise((resolve) => {
					index({})
						.then(res => {
							Object.keys(res.data.list).map(item => {
								this.array.push(res.data.list[item].name)
							})
							this.classList = res.data.list
							resolve();
						})
						.catch(res => {});
				});
			},
			find() {
				examine_find({})
					.then(res => {
						let form = res.data
						this.form = form
						this.index = this.classList.findIndex(fruit => fruit.id === res.data.classification_id);
					})
					.catch(res => {

					});
			},
			ok() {
				debugger;
				if (this.form.PromotionName == '') {
					return uni.showToast({
						title: '请输入推广者名称',
						icon: 'none',

					});

				}
				if (this.form.PromotionAddress == '') {
					return uni.showToast({
						title: '请输入推广者地址',
						icon: 'none',

					});

				}
				if (this.form.RealNameInfo == '') {
					return uni.showToast({
						title: '请上传营业执照或者身份证',
						icon: 'none',
					});
				}
				if (this.form.ContactNumber == '') {
					return uni.showToast({
						title: '请输入联系电话',
						icon: 'none',
					});
				}
				if (!this.isValidPhoneNumber(this.form.ContactNumber)) {
					return uni.showToast({
						title: '联系电话输入有误',
						icon: 'none'
					});
				}
				if (!this.form.SiteInfoImgs) {
					return uni.showToast({
						title: '请上传场所信息图片',
						icon: 'none'
					});
				}

				this.form.PromotionUserType = this.array[this.index].id + "";
				this.form.PromotionAddress = this.addressArr[this.Addressindex].id + "";
				this.form.openId = this.$store.state.user.openid;
				this.form.SiteInfoImgs = this.form.SiteInfoImgs.replace(this.domain, '');
				this.form.RealNameImgs = this.form.RealNameImgs.replace(this.domain, '');
				this.form.PromotionImgs = this.form.PromotionImgs.replace(this.domain, '');
				PromotionUserApply(this.form)
					.then(res => {
						debugger;
						if (res.status == 0) {
							this.loadEntity();
							// this.form.SiteInfoImgs = `${this.domain}${this.form.SiteInfoImgs}`;
							// this.form.RealNameImgs = `${this.domain}${this.form.RealNameImgs}`;
							// this.form.PromotionImgs = `${this.domain}${this.form.PromotionImgs}`;
							// this.form = {
							// 	PromotionAddress: '',
							// 	PromotionName: '',
							// 	PromotionUserType: '',
							// 	SiteInfoImgs: '',
							// 	RealNameImgs: '',
							// 	RealNameInfo: '',
							// 	ContactNumber: '',
							// 	PromotionImgs: '',
							// 	openId: ''
							// };
							return uni.showToast({
								title: res.msg
							});
						}

					})
					.catch(res => {});

			},

			isValidPhoneNumber(phoneNumber) {
				// 简单的电话号码正则表达式，可以根据需要进行调整
				var regex = /^1[3-9]\d{9}$/;
				return regex.test(phoneNumber);
			},
			// 检查并申请权限
			async checkAndRequestPermission() {
				return new Promise((resolve, reject) => {
					wx.getSetting({
						success: (res) => {
							// 如果没有相机和相册权限
							if (!res.authSetting['scope.camera']) {
								wx.authorize({
									scope: 'scope.camera',
									success: () => {
										// 相机授权成功后再请求相册权限
										wx.authorize({
											scope: 'scope.writePhotosAlbum',
											success: () => {
												resolve(true);
											},
											fail: () => {
												// 用户拒绝相册授权
												wx.showModal({
													title: '提示',
													content: '需要您授权相册权限才能上传图片',
													confirmText: '去设置',
													success: (
														res
													) => {
														if (res
															.confirm
														) {
															wx.openSetting({
																success: (
																	settingRes
																) => {
																	if (settingRes
																		.authSetting[
																			'scope.writePhotosAlbum'
																		]
																	) {
																		resolve
																			(
																				true
																			);
																	} else {
																		resolve
																			(
																				false
																			);
																	}
																}
															});
														} else {
															resolve
																(
																	false
																);
														}
													}
												});
											}
										});
									},
									fail: () => {
										// 用户拒绝相机授权
										wx.showModal({
											title: '提示',
											content: '需要您授权相机权限才能拍照',
											confirmText: '去设置',
											success: (res) => {
												if (res.confirm) {
													wx.openSetting({
														success: (
															settingRes
														) => {
															if (settingRes
																.authSetting[
																	'scope.camera'
																]
															) {
																this.checkAndRequestPermission()
																	.then(
																		resolve
																	);
															} else {
																resolve
																	(
																		false
																	);
															}
														}
													});
												} else {
													resolve(false);
												}
											}
										});
									}
								});
							} else {
								// 已有相机权限，检查相册权限
								if (!res.authSetting['scope.writePhotosAlbum']) {
									wx.authorize({
										scope: 'scope.writePhotosAlbum',
										success: () => {
											resolve(true);
										},
										fail: () => {
											resolve(false);
										}
									});
								} else {
									resolve(true);
								}
							}
						},
						fail: () => {
							resolve(false);
						}
					});
				});
			},

			// 检查隐私协议
			checkPrivacyAuthorize() {
				return new Promise((resolve) => {
					if (this.privacyAgree) {
						resolve(true);
						return;
					}

					// 获取隐私协议状态
					wx.getPrivacySetting({
						success: (res) => {
							if (res.needAuthorization) {
								// 需要用户授权
								wx.requirePrivacyAuthorize({
									success: () => {
										this.privacyAgree = true;
										resolve(true);
									},
									fail: () => {
										uni.showModal({
											title: '提示',
											content: '需要您同意隐私协议才能使用该功能',
											showCancel: false
										});
										resolve(false);
									}
								});
							} else {
								this.privacyAgree = true;
								resolve(true);
							}
						},
						fail: () => {
							resolve(false);
						}
					});
				});
			},

			// 修改上传图片方法
			async uploadpic(key) {
				// 先检查隐私协议授权
				const hasPrivacyAuth = await this.checkPrivacyAuthorize();
				if (!hasPrivacyAuth) return;

				const that = this;
				uni.chooseImage({
					count: 1,
					sizeType: ['compressed'],
					sourceType: ['album', 'camera'],
					success: function(res) {
						const tempFilePath = res.tempFilePaths[0];
						uni.showLoading({
							title: '上传中...'
						});
						uni.uploadFile({
							url: that.$config.HTTP_REQUEST_URL + '/api/wx/FileUpload/UploadFile',
							filePath: tempFilePath,
							name: 'file',
							header: {
								'Authorization': uni.getStorageSync('TOKEN') || ''
							},
							success: (uploadRes) => {
								uni.hideLoading();
								try {
									const data = JSON.parse(uploadRes.data);
									if (data.status === 0) {
										var path = data.data.replace(/\\/g, '/');
										that.form[key] = `${that.domain}${path}`;
										if (key == 'PromotionImgs') {
											var fileName = data.remark;
											if (that.isImageFile(fileName)) {
												that.uptype = 1
											} else {
												that.uptype = 0
											}
										}

										uni.showToast({
											title: '上传成功',
											icon: 'success'
										});
									} else {
										uni.showToast({
											title: data.message || '上传失败',
											icon: 'none'
										});
									}
								} catch (e) {
									uni.showToast({
										title: '上传失败',
										icon: 'none'
									});
								}
							},
							fail: (error) => {
								uni.hideLoading();
								uni.showToast({
									title: '上传失败',
									icon: 'none'
								});
							}
						});
					},
					fail: (err) => {
						console.error('选择图片失败：', err);
						uni.showToast({
							title: '选择图片失败',
							icon: 'none'
						});
					}
				});
			},
			async uploadvideo(key) {
				// 先检查隐私协议授权
				const hasPrivacyAuth = await this.checkPrivacyAuthorize();
				if (!hasPrivacyAuth) return;

				const that = this;
				uni.chooseMedia({
					mediaType: ['image', 'video'],
					maxDuration: 10,
					count: 1,
					sizeType: ['compressed'],
					sourceType: ['album', 'camera'],
					success: function(res) {
						const tempFilePath = res.tempFiles[0].tempFilePath;
						uni.showLoading({
							title: '上传中...'
						});
						uni.uploadFile({
							url: that.$config.HTTP_REQUEST_URL + '/api/wx/FileUpload/UploadFile',
							filePath: tempFilePath,
							name: 'file',
							header: {
								'Authorization': uni.getStorageSync('TOKEN') || ''
							},
							success: (uploadRes) => {
								uni.hideLoading();
								try {
									const data = JSON.parse(uploadRes.data);
									if (data.status === 0) {
										var path = data.data.replace(/\\/g, '/');
										that.form[key] = `${that.domain}${path}`;
										if (key == 'PromotionImgs') {
											var fileName = data.remark;
											if (that.isImageFile(fileName)) {
												that.uptype = 1
											} else {
												that.uptype = 0
											}
										}

										uni.showToast({
											title: '上传成功',
											icon: 'success'
										});
									} else {
										uni.showToast({
											title: data.message || '上传失败',
											icon: 'none'
										});
									}
								} catch (e) {
									uni.showToast({
										title: '上传失败',
										icon: 'none'
									});
								}
							},
							fail: (error) => {
								uni.hideLoading();
								uni.showToast({
									title: '上传失败',
									icon: 'none'
								});
							}
						});
					},
					fail: (err) => {
						console.error('选择图片失败：', err);
						uni.showToast({
							title: '选择图片失败',
							icon: 'none'
						});
					}
				});
			},
			uploadmp4: function() {
				let that = this;
				that.$util.uploadmp4('upload/mp4', (res) => {
					this.form.tuwen = res.data.url
					if (this.isImageFile(res.data.name)) {
						this.uptype = 1
					} else {
						this.uptype = 0
					}
				});
			},
			isImageFile(filename) {
				// 获取文件的扩展名
				const extension = filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase();
				// 常见图片文件扩展名
				const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg'];
				// 检查文件扩展名是否在图片扩展名数组中
				return imageExtensions.includes(extension);
			},

			// 获取地址
			async getMapLocation() {
				// 先检查隐私协议授权
				const hasPrivacyAuth = await this.checkPrivacyAuthorize();
				if (!hasPrivacyAuth) return;

				const that = this;
				uni.chooseLocation({
					success: function(res) {
						console.log('选择地址成功:', res);
						that.form.PromotionAddress = res.address;
						that.form.latitude = res.latitude;
						that.form.longitude = res.longitude;
					},
					fail: function(err) {
						console.error('选择地址失败:', err);
						if (err.errMsg.includes('auth deny')) {
							uni.showModal({
								title: '提示',
								content: '需要您授权位置权限才能选择地址',
								confirmText: '去设置',
								success: (res) => {
									if (res.confirm) {
										uni.openSetting({
											success: (settingRes) => {
												if (settingRes.authSetting[
														'scope.userLocation']) {
													setTimeout(() => {
														that
															.getMapLocation();
													}, 1000);
												}
											}
										});
									}
								}
							});
						} else {
							uni.showToast({
								title: '选择地址失败，请重试',
								icon: 'none'
							});
						}
					}
				});
			},

			bindPickerChange(e) {
				this.index = e.detail.value
			},
			bindaddressChange(e) {
				this.Addressindex = e.detail.value;
				this.form.PromotionAddress = this.addressArr[this.Addressindex].id + "";
			}
		}
	}
</script>

<style>
	.san {
		width: 20upx;
		height: 30upx;
		position: absolute;
		left: 0;
	}

	.top {
		display: flex;

		width: 95%;
		margin: 0 auto;
		margin-top: 10%;
		position: relative;
		justify-content: center;
		align-items: center;
	}

	.title {
		text-align: center;
	}

	.main {
		padding: 20rpx;
		background: #f5f5f5;
		min-height: 100vh;
		padding-bottom: 180rpx;
		/* 添加底部安全距离 */
	}

	.form-section {
		background: #fff;
		border-radius: 16rpx;
		padding: 30rpx;
		/* margin-bottom: 40rpx; */
		margin-bottom: 170rpx;
		/* 确保内容不被底部按钮遮挡 */
	}

	.form-item {
		margin-bottom: 30rpx;
	}

	.form-item:last-child {
		margin-bottom: 0;
	}

	.label {
		font-size: 28rpx;
		color: #333;
		margin-bottom: 16rpx;
		font-weight: 500;
	}

	.input-box {
		border: 1px solid #eee;
		border-radius: 12rpx;
		background: #f8f8f8;
		padding: 4rpx 20rpx;
	}

	.input-box input {
		height: 80rpx;
		font-size: 28rpx;
	}

	.address-box {
		display: flex;
		align-items: center;
		gap: 20rpx;
	}

	.picker-box {
		flex: 1;
		border: 1px solid #eee;
		border-radius: 12rpx;
		background: #f8f8f8;
		padding: 20rpx;
	}

	.picker {
		font-size: 28rpx;
		color: #333;
	}

	.address-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 20rpx 30rpx;
		background: #fff;
		border: 1px solid #FC0000;
		border-radius: 12rpx;
	}

	.btn-icon {
		font-size: 32rpx;
		margin-right: 8rpx;
	}

	.btn-text {
		font-size: 26rpx;
		color: #FC0000;
	}

	.upload-box {
		display: flex;
		align-items: center;
		gap: 20rpx;
	}

	.img-box {
		width: 160rpx;
		height: 160rpx;
		border: 1px dashed #ddd;
		border-radius: 12rpx;
		overflow: hidden;
	}

	.preview-image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.upload-placeholder {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: #f8f8f8;
	}

	.upload-icon {
		font-size: 40rpx;
		color: #999;
		margin-bottom: 8rpx;
	}

	.upload-text {
		font-size: 24rpx;
		color: #999;
		text-align: center;
	}

	.upload-desc {
		font-size: 26rpx;
		color: #666;
	}

	.id-box {
		display: flex;
		align-items: center;
		gap: 20rpx;
	}

	.id-input {
		flex: 1;
		border: 1px solid #eee;
		border-radius: 12rpx;
		background: #f8f8f8;
		height: 80rpx;
		padding: 0 20rpx;
		font-size: 28rpx;
	}

	.media-box {
		background: #f8f8f8;
		border-radius: 12rpx;
		padding: 20rpx;
	}

	.media-desc {
		font-size: 26rpx;
		color: #666;
		margin-bottom: 16rpx;
	}

	.media-content {
		width: 300rpx;
		height: 300rpx;
		margin: 0 auto;
		border: 1px dashed #ddd;
		border-radius: 12rpx;
		overflow: hidden;
	}

	.media-preview {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.media-tip {
		font-size: 26rpx;
		color: #666;
		text-align: center;
		margin-top: 16rpx;
	}

	.action-buttons {
		position: fixed;
		bottom: 120rpx;
		left: 0;
		right: 0;
		padding: 30rpx;
		background: #fff;
		box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.05);
		z-index: 99;
	}

	.submit-btn {
		background: linear-gradient(to right, #FF4B4B, #FC0000);
		color: #fff;
		height: 88rpx;
		border-radius: 44rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 32rpx;
		margin-bottom: 20rpx;
		box-shadow: 0 4rpx 16rpx rgba(252, 0, 0, 0.3);
	}

	.verify-btn {
		background: #fff;
		color: #FC0000;
		height: 88rpx;
		border-radius: 44rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 32rpx;
		border: 1px solid #FC0000;
	}

	.bg {
		position: fixed;
		width: 100%;
		height: 100%;
		background-color: #000;
		z-index: 0;
		opacity: 0.5;
		left: 0;
		top: 0;

	}

	.caozuo {
		position: fixed;

		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		z-index: 99;
		background-color: #fff;
		z-index: 9;
		width: 90%;
		border-radius: 20upx;
		display: flex;
		padding: 3.5%;
	}

	.an {
		width: 33.33%;
		background-color: #FC0000;
		color: #FFFFFF;
		margin-right: 2.5%;
		margin-left: 2.5%;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		border-radius: 10upx;
		padding: 3%;
	}

	.ok {
		width: 450upx;
		height: 90upx;
		background-color: #FC0000;
		color: #fff;
		margin: 0 auto;
		margin-top: 10%;
		border-radius: 45upx;
		display: flex;
		align-items: center;
		justify-content: center;

	}

	.xiao {
		display: block;
	}

	.hexiaom {
		border: 1px solid #A5A5A5;
		height: 80upx;
		border-radius: 20upx;
		margin-top: 10%;
	}

	.image {
		width: 80upx;
		height: 80upx;
	}

	.certificate {
		margin-left: 3%;
		border: 1px solid #A5A5A5;
		border-radius: 10upx;
		margin-right: 3%;
	}

	.tuwen {
		width: 150upx;
		height: 150upx;
	}

	.selAddress {
		width: 80upx;
		border: 1px dashed #A5A5A5;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		border-radius: 10upx;
	}
</style>